package com.example.Controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.dao.PositionMapper;
import com.example.pojo.Position;
import com.example.util.Result;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@CrossOrigin
@RestController
@Api(tags = "职位管理")
public class PositionController {

    @Autowired
    private PositionMapper positionMapper;


    @RequestMapping("/selectPoInfo") //查询所有的职位
    public Result  selectPoInfo(){
        QueryWrapper<Position> wrapper = new QueryWrapper<>();
        wrapper.gt("id",2);
        List<Position> positions = positionMapper.selectList(wrapper);
        return  new Result("200","查询成功",positions);
    }
}
